#pragma once
#include <memory>

//单例模式：饿汉;
class SingletonEhan
{
private:
    static std::shared_ptr<SingletonEhan> m_pInstance;
    //私有化构造函数, 方式外部new;
    SingletonEhan();
    
    //禁用拷贝构造和赋值重载
    SingletonEhan(const SingletonEhan& hs) = delete;
    SingletonEhan& operator=(const SingletonEhan& hs) = delete;
public:
    ~SingletonEhan();

    //获取单例;
    static std::shared_ptr<SingletonEhan> GetInstance();

    /// <summary>
    /// 其他接口;
    /// </summary>
    void Display();
};
